package com.tzinfo.tztbase.index;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;

import com.tzinfo.tztbase.TztBaseLoginActivity;
import com.tzinfo.tztbase.TztBaseMainActivity;
import com.yxw.view.util.ResFinder;

/**
 * Created by tongwanglin on 14-1-20.
 */
public class TztBaseIndex {
	public static Class activtyBang = null;
	public static Class activtyHouse = null;
	public static Class activtyCar = null;
	public static Class activtyPeixun = null;
	public static Class activtySearch = null;

	public static void gotoTzbBaseIndex(Context context) {
		Intent intent = new Intent(context, TztBaseMainActivity.class);
		context.startActivity(intent);
		((Activity) context).overridePendingTransition(
				ResFinder.getR(context, "R.anim.left_in"),
				ResFinder.getR(context, "R.anim.left_out"));
	}

	public static void goLoginActivity(Context context) {
		final Context herecontext=context;
		new AlertDialog.Builder(herecontext)
				.setCancelable(false)
				.setMessage("您还没登录，请先登录！")
				.setPositiveButton("取消", new DialogInterface.OnClickListener()

				{
					public void onClick(DialogInterface dialog, int which) {
					}
				})
				.setNegativeButton("前往登录",
						new DialogInterface.OnClickListener()

						{
							public void onClick(

							DialogInterface dialogInterface, int

							whichButton) {
								Intent intent = new Intent(herecontext,
										TztBaseLoginActivity.class);
								herecontext.startActivity(intent);
							}
						}).show();
	}
}
